<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background: #ddd;
        }

        #canvas {
            margin: 10px;
            padding: 10px;
            background: #fff;
            border: thin inset #aaa
        }
    </style>
</head>

<body>
    <canvas id="canvas" width="1500" height="800"></canvas>
    <script>
        const canvas = document.getElementById('canvas');
        const ctx = canvas.getContext('2d');
        ctx.font = '138pt Arial'
        ctx.fillStyle = 'cornflowerblue'
        ctx.strokeStyle = 'rgba(0,0,0,.5)'
        ctx.lineWidth = 6;
        ctx.fillText('Hello 李宗文', canvas.width / 2 - 500, canvas.height / 2 + 15)
        // strokeText
        ctx.strokeText('Hello 李惟晨', canvas.width / 2 - 500, canvas.height / 2 + 15)
    </script>
</body>

</html>